<!--
 * @Author: your name
 * @Date: 2021-03-16 20:22:55
 * @LastEditTime: 2021-03-16 20:42:53
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \daily\原型链和继承.html
-->
<script>
  function Car(a, b, c) {
    this.a = a//this指向新创建的对象 car 
    this.b = function () {//构造函数自身的b等于一个方法
     console.log(b);
    }
  }
  var car = new Car(99, 'basdasd', 'c')
  console.log(car.a,car.b);
  car.b()//因为这是方法，所以直接调用即可，log在方法内部执行了
  

</script>